 var BASEURL = 'https://huaan.lsyat.com/';
//var BASEURL = 'http://192.168.0.190:8089/';
// var BASEURL = 'https://www.faceid.space/';
// var BASEURL = 'http://test.kq.lsyat.com/'
// var BASEURL = 'http://192.168.0.133:8089/'

// var BASEURL = 'http://kq.lsyat.com/';
// var BASEURL = 'https://kq.focus-face.com/';
/**
 * PROJECT_VERSION 项目版本,可能会有临时需求,用来判断
 * yinni 印尼版本
 * yundianmao 主版本
 */

var PROJECT_VERSION = 'Indonesia'

//对应版本标识
var PROJECT_MASTER = 'yundianmao'
var PROJECT_YINNI = 'Indonesia'

/**
 * img使用的版本
 */
var IMG_VERSION = "oss";

var OSS = "oss"
var LOCAL = "local"


//鉴权链接 华安
// var AUTHORIZE = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx2d4c2ed73046fb0f&redirect_uri=https://huaan.lsyat.com/yundianmao/auth/index.html&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect";
//鉴权链接 浩景
var AUTHORIZE = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxf226e55cf6871c63&redirect_uri=https://huaan.lsyat.com/yundianmao/auth2/index.html&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect";


// 鉴面
// var AUTHORIZE = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxee30b5c1bc03ca3c&redirect_uri=https://kq.focus-face.com/yundianmao/emp/index.html&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect";

//request url

var GET_OPENID = 'attrecordController.do?Wxregistergoauth&company=2' //获取微信用户信息

// var GET_AUTHLIST='authlistController.do?apiauthquerylist'//获取授权列表
var GET_AUTHLIST='authlistController.do?queryauthlist' //获取授权列表,不登陆

var GET_REPEAT = 'authlistController.do?checkauthrepeat' //检查是否重复授权 TODO

// var GET_SAVEORDER='authlistController.do?apiauthsaveorder&company=2'//创建支付订单
var GET_SAVEORDER='authlistController.do?saveauthorder&company=2'//创建支付订单

// var GET_queryorderid='authlistController.do?apiauthorderid'//根据id查询待支付订单 
var GET_queryorderid='authlistController.do?queryorderid' //根据id查询待支付订单 

// var GET_queryorder='authlistController.do?apiauthqueryorder' //获取所有订单信息
var GET_queryorder='authlistController.do?queryorder'

var GET_apiauthcompany='authlistController.do?apiauthcompany' //获取授权公司字典

var USER_LOGIN='attrecordController.do?checkuser' //登录


module.exports = {
	BASEURL,
	AUTHORIZE,
	GET_OPENID,
	GET_AUTHLIST,
	OSS,
	LOCAL,
	IMG_VERSION,
	PROJECT_YINNI,
	PROJECT_MASTER,
	PROJECT_VERSION,
	GET_SAVEORDER,
	GET_queryorderid,
	GET_queryorder,
	USER_LOGIN,
	GET_apiauthcompany,
	GET_REPEAT
}

// function getUserid(){
// 	const value = uni.getStorageSync('userid');
// 	console.log(value)
// 	return value
// }

// function getUnitno(){
// 	const value = uni.getStorageSync('unitno');
// 	return value
// }

// function saveUserid(userid){
// 	uni.setStorage({
// 	    key: 'userid',
// 	    data: userid,
// 	    success: function () {
// 	        console.log('userid save success');
// 	    }
// 	});
// }

// function saveUnitno(unitno){
// 	uni.setStorage({
// 	    key: 'unitno',
// 	    data: unitno,
// 	    success: function () {
// 	        console.log('unitno save success');
// 	    }
// 	});
// }

// function checkUserInfo(){
// 	let userid = getApp().globalData.userid
// 	let unitno = getApp().globalData.unitno
// 	if(userid == ''){
// 		let id = getUserid()
// 		getApp().globalData.userid = id
// 	}
// 	if(unitno == ''){
// 		let unitno = getUnitno()
// 		getApp().globalData.unitno = unitno
// 	}
// 	// console.log(getApp().globalData.userid)
// 	// console.log(getApp().globalData.unitno)
// }